package day02

/**
 *  for 中的循环守卫的操作
 */
object ForDemo2 {
  def main(args: Array[String]): Unit = {
     forTestMethod2()
  }

  private def forTestMethod2(): Unit = {
    for (i <- 1 to 10 if i != 5) {
      println(i)
    }
  }

  // 具体的 方法
  private def forTestMethod(): Unit = {
    // 循环守卫
    for (i <- 1 to 10) {
      if (i != 5) {
        println(i)
      }
    }
  }
}
